package com.traffic.repository.trafficcar;/**
 * Created by Administrator on 2018/4/1.
 */

import com.traffic.entity.TrafficCar;
import com.traffic.entity.TrafficLine;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;


@Repository
@Transactional
public interface TrafficCarRepository extends JpaRepository<TrafficCar, Long> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    TrafficCar findById(Long id);

    Page<TrafficCar> findAllByLineOrCar(String line, String car, Pageable pageable);


}
